package com.zeta.system.model.param;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;

/**
 * 新增 字典项
 *
 * @author AutoGenerator
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "新增字典项")
public class SysDictItemSaveDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /** 字典id */
    @Schema(description = "字典id", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "字典id不能为空")
    private Long dictId;

    /** 字典项 */
    @Schema(description = "字典项", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "字典项不能为空")
    @Size(max = 32, message = "字典项长度不能超过32")
    private String name;

    /** 值 */
    @Schema(description = "值", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "值不能为空")
    @Size(max = 32, message = "值长度不能超过32")
    private String value;

    /** 描述 */
    @Schema(description = "描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String describe;

    /** 排序 */
    @Schema(description = "排序", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Integer sortValue;

}
